Categories

Versions

Extract Macro (Format) (Operator Toolbox)

Synopsis

This operator is giving you the similar functionality than Extract Macro, but allows you to specify date and numerical formats. The operator also allows you to extract the size of a collection.

Description

This operator can be used to define a single macro which can be used by %{macro_name} in parameter values of succeeding operators of the current process. The macro value will be derived from the input ExampleSet. A macro can be considered as a value that can be used by all operators of the current process that come after the macro has been defined. This operator can also be used to re-define an existing macro.

Input

  • exa (Data Table)

    This input port expects an ExampleSet or an IOObjectCollection. The macro value will be extracted from this ExampleSet or the size of the collection.

Output

  • exa (Data Table)

    The ExampleSet or IOObjectCollection that was given as input is passed without changing to the output through this port. This is usually used to reuse the same object in further operators. It is not compulsory to attach this port to any other port, Macro value is set even if this port is left without connections.

Parameters

  • macro This parameter is used to name the macro and can be accessed in succeeding operators of current process by writing the macro name in %{macro_name} format, where 'macro_name' is the name of the macro specified by this parameter. Range:
  • macro_type Indicates the way how the macro should be defined. Range:
  • statistics The statistics of the specified attribute which should be used as macro value. Range:
  • attribute_name The name of the attribute from which the data should be derived. Range:
  • attribute_value The value of the attribute which should be counted. Range:
  • example_index The index of the example from which the data should be derived. Negative indices are counted from the end of the data set. Positive counting starts with 1, negative counting with -1. Range:
  • format_of_numericals Format for numerical outputs. #.## indicates values in the form: 3.14, while #.##E00 indicates scientific notation, e.g. 3.14E00. The used implementation is Java's DecimalFormat class. Range:
  • date_format This is the most important parameter of this operator. It specifies the date time format of the desired nominal attribute. This date format string specifies what portion of the date attribute should be stored in the nominal attribute. Date format strings are discussed in detail in the description of Date to Nominal. Range:
  • locale The used locale for date texts, for example "Wed" (English) in contrast to "Mi" (German). Range:

Tutorial Processes

Extracting a Single Cell with a Specified Number Format

In this tutorial process we create random data and extract the first value of att1 with a specified number format. We later display the result as an ExampleSet.